package com.xquant.marketdata.marketdata.controller;

import com.github.pagehelper.PageInfo;
import com.xquant.marketdata.marketdata.service.BondService;
import com.xquant.system.api.RemoteUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 下拉框查询
 *
 * @author ershuai.zhao
 */
@RestController
@RequestMapping("bondController")
public class BondController {

    @Autowired
    private BondService bondService;


    /**
     * 查询 债券信息
     */
    @ResponseBody
    @RequestMapping(value = "/queryBondInfoByPage.action")
    public PageInfo<Map> queryBondInfoByPage(@RequestParam Map<String, Object> param) {
        PageInfo<Map> pageInfo = bondService.queryBondInfoByPage(param);
        return pageInfo;
    }

    @ResponseBody
    @RequestMapping(value = "/queryBondInfoList.action")
    public List<Map> queryBondInfoList(@RequestParam Map<String, Object> param) {
        param.put("start",0);
        param.put("end",20);
        return bondService.queryBondInfoByPageList(param);
    }
    /**
     * 查询 债券分红
     */
    @ResponseBody
    @RequestMapping(value = "/queryBondPriceByPage.action")
    public PageInfo<Map> queryBondPriceByPageByPage(@RequestParam Map<String, Object> param) {

        PageInfo<Map> pageInfo = bondService.queryBondPriceByPage(param);

        return pageInfo;
    }




}
